be4e4e0e3b3c07a464a7c8d36b216af683f8d6f3,sample/src/test/java/sample/SecurityTests.java,SecurityTests,basicWorks,#,53
Before Change
@Test
public void basicWorks() throws Exception {
Mono<ResponseEntity<Map<String,String>>> response = this.webClient
.perform(usersRequest().apply(robsCredentials()))
.extract(mapStringString());
assertThat(response.block().getStatusCode()).isEqualTo(HttpStatus.OK);
}
After Change
@Test
public void basicWorks() throws Exception {
ClientRequest<Void> request = usersRequest().build();
ExchangeFunction client = robsCredentials().apply(this.webClient::exchange);
Mono<HttpStatus> response = client.exchange(request)
.then(this::httpStatus);
assertThat(response.block()).isEqualTo(HttpStatus.OK);
}